<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <script>
            setTimeout(()=>{//立即添加到宏队列
                console.log('timeout callback()')
            },1000)
            
            Promise.resolve(1).then(//立即添加到微队列
                value=>{
                    console.log("Promise onResolved()",value)
                }
            )
            //微队列的优先级更高
            //在执行宏队列之前，要把所有的微队列执行完毕
        </script>
    </body>
</html>